﻿Imports System.ComponentModel


Public MustInherit Class ViewModelNewPMTWizardPageBase
    Implements INotifyPropertyChanged

#Region " Declarations "

    Private _bolIsCurrentPage As Boolean = False
    Private _objPMT As IPMT

#End Region

#Region "Constructeur"
    Public Sub New()

    End Sub
    Public Sub New(PMT As IPMT)
        _objPMT = PMT
    End Sub
#End Region

#Region " Properties "

    Protected ReadOnly Property PMT() As IPMT
        Get
            Return _objPMT
        End Get
    End Property

    Public MustOverride ReadOnly Property DisplayName() As String

    Public Property IsCurrentPage() As Boolean
        Get
            Return _bolIsCurrentPage
        End Get
        Set(ByVal Value As Boolean)
            _bolIsCurrentPage = Value
            OnPropertyChanged("IsCurrentPage")
        End Set
    End Property

    Public MustOverride ReadOnly Property IsValid() As Boolean

#End Region

#Region " Events "

    Public Event PropertyChanged As PropertyChangedEventHandler Implements System.ComponentModel.INotifyPropertyChanged.PropertyChanged

#End Region

#Region " Methods "

    Protected Sub OnPropertyChanged(ByVal strPropertyName As String)

        Dim handler As PropertyChangedEventHandler = Me.PropertyChangedEvent

        If handler IsNot Nothing Then
            handler.Invoke(Me, New PropertyChangedEventArgs(strPropertyName))
        End If

    End Sub

#End Region

End Class